//
//  PayMoneyOrderCell.m
//  YunGou
//
//  Created by macbook on 16/6/14.
//  Copyright © 2016年 macbook. All rights reserved.
//

#import "PayMoneyOrderCell.h"
#import "NSString+Frame.h"
@interface PayMoneyOrderCell ()
@property (weak, nonatomic) IBOutlet UILabel *goodNameLabel;
@property (weak, nonatomic) IBOutlet UILabel *goNumberLabel;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *renciConstraint;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *goodsNameConstraint;
@end

@implementation PayMoneyOrderCell

- (void)awakeFromNib {
    // Initialization code
}

- (void)setProductModel:(ProductModel *)productModel{
    _goodNameLabel.text = productModel.title;
    _goNumberLabel.text = [NSString stringWithFormat:@"%ld人次",productModel.goods_num];
    
    CGFloat renciWidth = [_goNumberLabel.text widthWithFont:[UIFont systemFontOfSize:13]];
    _renciConstraint.constant = renciWidth;
    _goodsNameConstraint.constant = ScreenWidth - 34 - renciWidth;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
